package com.cloudbroker.bcs.platform.dav.middle.service.impl;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.cloudbroker.bcs.platform.dav.middle.dao.WechatShareDao;
import com.cloudbroker.bcs.platform.dav.middle.entity.WechatShare;
import com.cloudbroker.bcs.platform.dav.middle.service.WechatShareService;
import com.cloudbroker.bcs.platform.dav.middle.service.base.TenantServiceImplBase;

/**
 * Created by zhaojp18008 on 2016/5/18.
 */
@Service
public class WechatShareServiceImpl extends TenantServiceImplBase<WechatShare, String> implements
        WechatShareService {
    @Resource
    private WechatShareDao wechatShareDao;
    
    @Override
    protected WechatShareDao getDAO() {
        return this.wechatShareDao;
    }
    
    @Override
    public void addShareTimes(Long wechatshare_id) {
        wechatShareDao.addShareTimes(wechatshare_id, getTenantId());
    }
    
    @Override
    public WechatShare getWechatShareByBrokerId(Long broker_id) {
        return wechatShareDao.getWechatShareByBrokerId(broker_id, getTenantId());
    }
}
